package ch.bfh.java.directorysynchronizer.presentation.Frame;

import java.awt.Color;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

import org.apache.log4j.lf5.viewer.LF5SwingUtils;

import ch.bfh.java.directorysynchronizer.presentation.items.Workbench;

public class LogfilePanel extends JPanel{
	
	/**
     * 
     */
    private static final long serialVersionUID = 1L;
    
	private Workbench workbench;
	
	public LogfilePanel(Workbench wb){
		
		this.workbench = wb;
		
		this.setPreferredSize(workbench.getLogfilePanelDimension());
		this.setLayout(new GridLayout(1,2));
		
		this.workbench.getLogfileDisplayer().setBorder(BorderFactory.createLineBorder(Color.BLACK));
		this.workbench.getLogfileDisplayer().setBackground(Color.lightGray);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setViewportView(workbench.getLogfileDisplayer());
		LF5SwingUtils.makeVerticalScrollBarTrack(scrollPane);
		this.add(scrollPane);
		

		
	}

}
